package modellayer;
import java.io.*;

/**
 * This class works as a Super Class for Ansat and Kunde. 
 * 
 * @author (Kasper) 
 * @version (04.12.2014)
 */
public abstract class Person implements Serializable
{ 
    private String navn;
    private String adresse;
    private String postnr;
    private String by;
    private String tlf;
    private String email;
    private String password;

    /**
     * Constructor for objects of class Person
     */
    public Person(String navn, String adresse, String postnr, String by, String tlf, String email)
    {
        this.navn = navn;
        this.adresse = adresse;
        this.postnr = postnr;
        this.by = by;
        this.tlf = tlf;
        this.email = email;
        password = tlf;
    }
    
    /**
     * Method getNavn
     *
     * @return navn
     */
    public String getNavn()
    {
        return navn;
    }
    
    /**
     * Method setNavn
     *
     * @param navn
     */
    public void setNavn(String navn)
    {
        this.navn = navn;
    }
    
    /**
     * Method getAdresse
     *
     * @return adresse
     */
    public String getAdresse()
    {
        return adresse;
    }
    
    /**
     * Method setAdresse
     *
     * @param adresse
     */
    public void setAdresse(String adresse)
    {
        this.adresse = adresse;
    }
    
    /**
     * Method getPostnr
     *
     * @return postnr
     */
    public String getPostnr()
    {
        return postnr;
    }
    
    /**
     * Method setPostnr
     *
     * @param postnr
     */
    public void setPostnr(String postnr)
    {
        this.postnr = postnr;
    }
    
    /**
     * Method getBy
     *
     * @return by
     */
    public String getBy()
    {
        return by;
    }
    
    /**
     * Method setBy
     *
     * @param by
     */
    public void setBy(String by)
    {
        this.by = by;
    }
    
    /**
     * Method getTlf
     *
     * @return telefonnummer
     */
    public String getTlf()
    {
        return tlf;
    }
    
    /**
     * Method setTlf
     *
     * @param telefonnummer
     */
    public void setTlf(String tlf)
    {
        this.tlf = tlf;
    }
    
    /**
     * Method getEmail
     *
     * @return email
     */
    public String getEmail()
    {
        return email;
    }
    
    /**
     * Method setEmail
     *
     * @param email
     */
    public void setEmail(String email)
    {
        this.email = email;
    }
    
    /**
     * Method getPassword
     *
     * @return password
     */
    public String getPassword()
    {
        return password;
    }
    
    /**
     * Method setPassword
     *
     * @param password
     */
    public void setPassword(String password)
    {
        this.password = password;
    }
    
    /**
     * Returns a String with information about a person.
     *
     * @return text
     */
    public String toString()
    {
        String text =
        "Navn: " + navn + "\n" +
        "Adresse: " + adresse + "\n" +
        "Postnummer: " + postnr + "\n" +
        "By: " + by + "\n" +
        "Telefonnummer: " + tlf + "\n" +
        "E-mail: " + email + "\n";
        
        return text;
    }
}